# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2025/3/1
desc: 
sample: 
"""
counter=3

while counter>0:
    username=input("请输入用户名：")
    password=input("请输入密码：")
    if username=="root" and password=="root":
        print("登录成功")
        break
    else:
        print("用户名或密码错误，请重新输入")
        counter-=1
        if counter==0:
            print("三次机会用完，登录失败")